#region License Revision: 0 Last Revised: 6/18/2008 11:00 AM
/******************************************************************************
Copyright (c) Microsoft Corporation.  All rights reserved.


This file is licensed under the Microsoft Public License (Ms-PL). A copy of the Ms-PL should accompany this file. 
If it does not, you can obtain a copy from: 

http://www.microsoft.com/resources/sharedsource/licensingbasics/publiclicense.mspx
******************************************************************************/
#endregion // License
using System;
using System.Windows.Browser;
using System.Diagnostics;
using ScriptInterop;

namespace VIEWS // Virtual Earth Wrapper
{
	/// <summary>LatLong Rectangle</summary>
	public class VELatLongRectangle : JSObject
	{
		/// <summary>String holding JavaScript class name</summary>
		private static string thisClass = "VELatLongRectangle";
		
		/// <summary>Get the JavaScript class name</summary>
		/// <returns type="String">The class name used in JavaScript </returns>		
		public override string ClassName
		{
			get { return thisClass; }
		}

		/// <summary>Construct a C# wrapper from a ScriptObject</summary>
		/// <param name="so">A ScriptObjet from JScript.</param>
		public VELatLongRectangle(ScriptObject so) : base(so) { }

		/// <summary>Initializes a new instance of the VELatLongRectangle object.</summary>
        /// <param name="topLeft" type="VELatLong">A VELatLong Class object that specifies the latitude and longitude of the upper-left corner of the map view.</param>
        /// <param name="bottomRight" type="VELatLong">A VELatLong Class object that specifies the latitude and longitude of the lower-right corner of the map view.</param>
        /// <param name="topRight" type="VELatLong">If the map is in 3D mode, a VELatLong Class object that specifies the latitude and longitude of the upper-right corner of the map view.</param>
        /// <param name="bottomLeft" type="VELatLong">If the map is in 3D mode, a VELatLong Class object that specifies the latitude and longitude of the lower-left corner of the map view.</param>
		public VELatLongRectangle(VELatLong topLeft, VELatLong bottomRight, VELatLong topRight, VELatLong bottomLeft)
		{
			ScriptObject = CreateClass((ScriptObject)topLeft, (ScriptObject)bottomRight, (ScriptObject)topRight, (ScriptObject)bottomLeft);
		}

		/// <summary type="VELatLong">A VELatLong Class object that specifies the latitude and longitude of the upper-left corner of the rectangle.</summary>
		public VELatLong TopLeft
		{
			get { var so = GetProperty<ScriptObject>("TopLeftLatLong"); return new VELatLong(so); }
			set { SetProperty("TopLeftLatLong", (ScriptObject)value); }
		}
		
		/// <summary type="VELatLong">A VELatLong Class object that specifies the latitude and longitude of the lower-right corner of the rectangle.</summary>
		public VELatLong BottomRight
		{
			get { var so = GetProperty<ScriptObject>("BottomRightLatLong"); return new VELatLong(so); }
			set { SetProperty("BottomRightLatLong", (ScriptObject)value); }
		}
		
		/// <summary type="VELatLong">If the map is in 3D mode, a VELatLong Class object that specifies the latitude and longitude of the upper-right corner of the rectangle.</summary>
		public VELatLong TopRight
		{
			get { var so = GetProperty<ScriptObject>("TopRightLatLong"); return new VELatLong(so); }
			set { SetProperty("TopRightLatLong", (ScriptObject)value); }
		}
		
		/// <summary type="VELatLong">If the map is in 3D mode, a VELatLong Class object that specifies the latitude and longitude of the lower-left corner of the rectangle.</summary>
		public VELatLong BottomLeft
		{
			get { var so = GetProperty<ScriptObject>("BottomLeftLatLong"); return new VELatLong(so); }
			set { SetProperty("BottomLeftLatLong", (ScriptObject)value); }
		}
	};
}
